export default {
  methods: {
    async hasEaPermission(usercode, funcName, ...args) {
      if (this.$store.getters.getUserType === 3) {
        //admin
        this[funcName](...args);
        return;
      }
      const isCreatedByUser = await this.$store.dispatch(
        "isCreatedByUser",
        usercode
      );
      if (!isCreatedByUser) return;
      this[funcName](...args);
    }
  }
};
